<%@ page import="mybatis.pojo.Subject" %>
<%@ page import="mybatis.services.SubjectService" %><%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2022/7/4
  Time: 17:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    request.setCharacterEncoding("utf-8");
    Long id =Long.parseLong( request.getParameter("id"));
    out.print(id);


    String subName = request.getParameter("subName");
    int classHour = Integer.parseInt(request.getParameter("classHour"));
    Long gradeId = Long.parseLong(request.getParameter("gradeId"));

    Subject subject = new Subject();
    subject.setId(id);
    subject.setSubjectname(subName);
    subject.setClasshour(classHour);
    subject.setGradeid(gradeId);
    int update = SubjectService.ME.update(subject);
    if (update > 0) {
        out.print("修改成功");
    } else {
        out.print("修改失败");
    }
%>

</body>
</html>
